/**
 * Created by Freeman on 2016/6/27.
 */
"use strict";

var express = require('express'),
    controller = require('./article.controller.js'),
    auth = require('../../auth/auth.service');

var router = express.Router();


router.post('/saveArticle',auth.isAuthenticated(),controller.saveArticle
);

router.get('/getFrontArticleList',controller.getFrontArticleList);
router.get('/getFrontArticleCount',controller.getFrontArticleCount);
router.get('/:id/getFrontArticle',controller.getArticleById);
router.put('/:id/toggleLike',auth.isAuthenticated(),controller.toggleLike);
router.delete('/:id/deleteArticle',auth.isAuthenticated(),controller.deleteArticle);
module.exports = router;